package com.cxf.cxfuserdemo.feign;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "cxf-store-demo",url = "http://localhost:9935",fallback = StoreFeignClientHystrix.class)
//@FeignClient(name = "${feign.name}",url = "${feign.url}",fallback = StoreFeignClientHystrix.class)
//@FeignClient(name = "cxf-store-demo",fallback = StoreFeignClientHystrix.class)
// TODO 去除测试的 url
public interface StoreFeignClient {


    @GetMapping("/echo/{msg}")
    public String echoYourMessageFromUserDemo(@PathVariable("msg") String msg);


    @GetMapping("/getLogin")
    public String echoYourMessage(@RequestParam("user") String user, @RequestParam("pwd") String pwd);


    @GetMapping("/getLogin")
    public String loginByMap(@RequestParam Map<String,Object> map);
}
